/**
 * @file
 * Implements network subsystem
 */
#include <network.h>
#include "c_Engine.h"
#include "c_IPv4_Address.h"

/**
 * Initialises Network subsystem
 */
void wiigi::c_Engine::initNetwork( void )
{
   char localip[16] = {0};
  	char gateway[16] = {0};
  	char netmask[16] = {0};
   
   s32 ret;      	
	ret = if_config ( localip, netmask, gateway, TRUE);
	if (ret < 0)
	   printf ("network configuration failed!\n");
      //printf ("network configured, ip: %s, gw: %s, mask %s\n", localip, gateway, netmask);
   
   c_IPv4_Address Local( localip );   
   c_IPv4_Address::setLocalAddress( Local );  
      
   return;
}
